package com.victor.zjbj_android.utils;

import com.victor.zjbj_android.utils.retrofit.BaseSubscriber;
import com.victor.zjbj_android.utils.retrofit.RetrofitUtils;

import java.util.HashMap;

/**
 * Created by liuwei on 2018/5/9.
 */

public class ZjbjManager {
    //登录
    public  void userLogin(String jsontext,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "login");
        mMap.put("a", "phone_login");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mRetrofit.post(mMap,baseSubscriber);
    }
    //忘记密码
    public  void userForgetPassword(String jsontext,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "login");
        mMap.put("a", "phone_forget_password");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mRetrofit.post(mMap,baseSubscriber);
    }

    //修改密码
    public  void userChangePassword(String jsontext,String token, RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "login");
        mMap.put("a", "phone_password_save");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mMap.put("token",token);
        mRetrofit.post(mMap,baseSubscriber);
    }


    //隐患类型查询列表
    public  void getYhtypeList(String jsontext,String token,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "yhtype");
        mMap.put("a", "phone_yhtype_list");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mMap.put("token",token);
        mRetrofit.post(mMap,baseSubscriber);
    }

    //隐患查询列表
    public  void getYinhuanList(String jsontext,String token,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "yinhuan");
        mMap.put("a", "phone_yinhuan_list");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mMap.put("token",token);
        mRetrofit.post(mMap,baseSubscriber);
    }

    //设备台账分页查询列表
    public  void getTaizhangList(String jsontext,String token,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "equip");
        mMap.put("a", "phone_data_list");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mMap.put("token",token);
        mRetrofit.post(mMap,baseSubscriber);
    }
    //查询具体一台设备的基本信息
    public  void getTaizhangInfo(String jsontext,String token,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "equip");
        mMap.put("a", "phone_data");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mMap.put("token",token);
        mRetrofit.post(mMap,baseSubscriber);
    }
    //手机端保存设备二维码
    public  void update(String jsontext,String token,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "equip");
        mMap.put("a", "phone_save_qrcode");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mMap.put("token",token);
        mRetrofit.post(mMap,baseSubscriber);
    }
    //证件到期提醒信息获取
    public  void getZhengJian(String jsontext,String token,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "popmessage");
        mMap.put("a", "phone_user_pop");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mMap.put("token",token);
        mRetrofit.post(mMap,baseSubscriber);
    }
    //检验提醒信息获取
    public  void getJianYanDaoQi(String jsontext,String token,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "popmessage");
        mMap.put("a", "phone_equip_jianyan");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mMap.put("token",token);
        mRetrofit.post(mMap,baseSubscriber);
    }
    //检修提醒信息获取
    public  void getJianXiuDaoQi(String jsontext,String token,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "popmessage");
        mMap.put("a", "phone_equip_jianxiu");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mMap.put("token",token);
        mRetrofit.post(mMap,baseSubscriber);
    }
    //手机端获取设备检验记录列表
    public  void getJianYanList(String jsontext,String token,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "equip");
        mMap.put("a", "phone_jianyan_list");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mMap.put("token",token);
        mRetrofit.post(mMap,baseSubscriber);
    }
    //手机端获取设备检修记录列表
    public  void getJianXiuList(String jsontext,String token,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "equip");
        mMap.put("a", "phone_jianxiu_list");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mMap.put("token",token);
        mRetrofit.post(mMap,baseSubscriber);
    }
    //手机端获取设备故障维修记录列表
    public  void getGuZhangList(String jsontext,String token,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "equip");
        mMap.put("a", "phone_fault_list");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mMap.put("token",token);
        mRetrofit.post(mMap,baseSubscriber);
    }
    //手机端保存设备故障保修单
    public  void saveGuZhangDan(String jsontext,String token,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "equip");
        mMap.put("a", "phone_fault_save");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mMap.put("token",token);
        mRetrofit.post(mMap,baseSubscriber);
    }
    //手机设备文件分类列表
    public  void getWenjianList(String jsontext,String token,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "equip");
        mMap.put("a", "phone_file_list");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mMap.put("token",token);
        mRetrofit.post(mMap,baseSubscriber);
    }
    //修改密码
    public  void  xiugaimima(String jsontext,String token,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "login");
        mMap.put("a", "phone_password_save");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mMap.put("token",token);
        mRetrofit.post(mMap,baseSubscriber);
    }
    //保存钳工信息
    public  void  saveqiangong(String jsontext,String token,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "equip");
        mMap.put("a", "phone_detail_save");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mMap.put("token",token);
        mRetrofit.post(mMap,baseSubscriber);
    }
    //手机端获取钳工或电工的检修项目列表
    public  void  getqiangonglist(String jsontext,String token,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "equip");
        mMap.put("a", "phone_detail_list");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mMap.put("token",token);
        mRetrofit.post(mMap,baseSubscriber);
    }
    //手机端添加故障检修处理单参数获取
    public  void  getWeiXiuChuList(String jsontext,String token,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "equip");
        mMap.put("a", "phone_rpaper_params");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mMap.put("token",token);
        mRetrofit.post(mMap,baseSubscriber);
    }
    //手机端添加故障检修处理单
    public  void  AddChuli(String jsontext,String token,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "equip");
        mMap.put("a", "phone_rpaper_save");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mMap.put("token",token);
        mRetrofit.post(mMap,baseSubscriber);
    }
    //手机端查询设备检修计划列表
    public  void  getJianXiuJiHuaList(String jsontext,String token,RetrofitUtils mRetrofit, BaseSubscriber baseSubscriber){
        HashMap<String,String> mMap = new HashMap<>();
        mMap.put("c", "equip");
        mMap.put("a", "phone_search_jianxiu_list");
        mMap.put("device_type","10");
        mMap.put("json_text",jsontext);
        mMap.put("token",token);
        mRetrofit.post(mMap,baseSubscriber);
    }
}
